<template>
    <div>
        <MyChart v-if="isUn"></MyChart>
        <button @click="isUn=!isUn">销毁</button>
    </div>
</template>

<script>
import MyChart from './MyChart.vue'
export default {
    components:{
        MyChart,
    },
    data(){
        return{
            isUn:true,
        }
    }
}
</script>